package com.itheima.service.impl;

import com.itheima.dao.BookDao;
import com.itheima.dao.UserDao;
import com.itheima.dao.impl.BookDaoimpl;
import com.itheima.service.BookService;

public class BookServiceimpl implements BookService {
    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
        System.out.println("setUserDao");
    }

    private UserDao userDao;
    public void setBookDao(BookDao bookDao) {
        this.bookDao = bookDao;
        System.out.println("setBookDao");
    }

    private BookDao bookDao;
    @Override
    //删除业务层中new的dao对象
    public void save() {
            System.out.println("book service is running");
            bookDao.save();
            userDao.save();
    }
}
